<style>
	.slideBox .bd li img {
		height: 373px;
		/* 图片宽度100%，达到自适应效果 */
	}
</style>
<div class="main">
			<div class="container" style="margin-bottom: 20px;margin-top: 20px;">
				<div style="display: flex;justify-content: space-between; position: relative;" id="menus">
					<div style="width: 260px; padding:20px; background: #fff;">
						<div class="layui-btn layui-btn-normal layui-btn-fluid">产品分类</div>
						<ul class="fitst_class">
							{volist name="nav" id="item"}
							<li data-id="{$item.id}">{$item.name}</li>
							{/volist}
						</ul>
					</div>
					<div class="children_class">

					</div>
					<div style="width: 930px;">
						<div id="slideBox" class="slideBox" style="max-width:100%;">
							<div class="hd" style="left:0;">
								<ul style="text-align: center;">
									{volist name="rs_banner" id="item"}
									<li></li>
									{/volist}
								</ul>
							</div>
							<div class="bd">
								<ul>
									{volist name="rs_banner" id="item"}
									<li><a href="{$item.url}" target="_blank"><img src="{$item.image}" /></a></li>
									{/volist}

								</ul>
							</div>

							<!-- 下面是前/后按钮代码，如果不需要删除即可 -->
							<a class="prev" href="javascript:void(0)"></a>
							<a class="next" href="javascript:void(0)"></a>
						</div>
					</div>
				</div>
				<div style="display: flex;justify-content: space-between; margin-top: 20px;">
					<div style="width: 880px;">
						{volist name="nav" id="item"}
						<div class="sec_title">
							<h3>{$item.name}</h3>
						</div>
						<ul class="chanpin_list">
							{volist name="$item.list" id="product_item"}
							<a href="{:url('xiangsuzhuangbei/product_detail',['id'=>$product_item.id])}"><li style="width:220px;" {switch name="product_item.biaoji"}
								{case value="1"}class="youzhi"{/case}
								{case value="2"}class="chuangxin"{/case}
								{default /}
							{/switch}>
								<img src="{$product_item.image}" style="display:block;margin:auto;">
								<h3 class="title">{$product_item.name}</h3>
								<p class="desc">{$product_item.qiye_name}</p>
							</li></a>
							{/volist}
						</ul>
						{/volist}
					</div>

					<div style="width: 310px;max-height: 3000px; overflow-y: auto;">
						<div class="arclist_303" style="margin-bottom: 10px;">
							<div class="list_title">企业列表</div><!--14条数据 -->
							<ul class="news_list" style="height: auto;">

								{volist name="qiye" id="item"}
								{if($i<3)}
									<a href="{:url('xiangsuzhuangbei/qiye_detail',['id'=>$item.id])}">
										<li><img src="{$item.image}" style="width: 50px;height: 50px;margin-right: 10px;" />{$item.name}</li>
									</a>
								{else/}
									<a href="{:url('xiangsuzhuangbei/qiye_detail',['id'=>$item.id])}">
										<li>{$item.name}</li>
									</a>
								{/if}
								{/volist}
							</ul>
						</div>
					</div>

				</div>
			</div>
		</div>
<script>
	jQuery(".slideBox").slide({mainCell:".bd ul",autoPlay:true});
	$('.fitst_class li').click(function(){
		$(this).addClass('active').siblings().removeClass('active');
		id=$(this).attr('data-id');
		$.ajax({
		    type:"GET",
		    url:"/api.php/index/get_children_category",
		    dataType:"json",
		    data:{
		        "pid":id,
		    },
		    success:function(res){
		      console.log(res.data);

				str='<div>';
				for(var i in res.data){
					str+='<dl>'+
						'<dt><a href="{:url('xiangsuzhuangbei/category')}?id='+res.data[i].id+'">'+res.data[i].name+'</a></dt>'+
						'<div>';
						for(var j in res.data[i].list){
							str+='<dd><a href="{:url('xiangsuzhuangbei/category')}?id='+res.data[i].list[j].id+'">'+res.data[i].list[j].name+'</a></dd>';
						}



						str+='</div>'+'</dl>';
				}
				$('.children_class').html(str);
		    }
		});

		$('.children_class').show();
	});
	$('#menus').mouseleave(function(){
		$('.children_class').hide();
	})
</script>
